#ifndef INQUIREPURCHASECOMMODITY_H
#define INQUIREPURCHASECOMMODITY_H

#include <QWidget>
#include "commodity.h"

class InquireSql;

enum attributeValue{Specification, Brand, Color, Unit, Category};

namespace Ui {
class InquirePurchaseCommodity;
}

class InquirePurchaseCommodity : public QWidget
{
    Q_OBJECT
    
public:
    explicit InquirePurchaseCommodity(QWidget *parent = 0);
    ~InquirePurchaseCommodity();
    void changelineEditInquire(QString);
    bool eventFilter(QObject *target, QEvent *event);
    
protected:
    void keyPressEvent(QKeyEvent *);

private slots:
    void on_pushButtonDisplayAll_clicked();

    void on_tableWidgetPurchaseCommodity_cellDoubleClicked(int row, int column);

    void on_pushButtonSelete_clicked();

    void on_lineEditInquire_textChanged(const QString &arg1);

signals:
    void displayCommodityInformation(QString);

private:
    void displayPurchaseCommodityInformaton(const QString &);
    void setTableWidgetColor();
    void setTableWidgetHeaderStyle();

    InquireSql *m_sql;

    commodityList m_list;

    bool m_selectAllLineEditInquireText;

    Ui::InquirePurchaseCommodity *ui;
};

#endif // INQUIREPURCHASECOMMODITY_H
